/**
 * 实现 Runnable 接口, 重写 run 方法
 */
public class ThreadExample2 implements Runnable {
    @Override
    public void run() {
        for (int i = 0; i < 10; i++) {
            System.out.println("The harder you work, the luckier you will be~");
        }
    }

    public static void main(String[] args) {
        ThreadExample2 threadExample2 = new ThreadExample2();
        Thread thread = new Thread(threadExample2);
        thread.start();
    }
}
